package edu.spec.teacher.service.impl;

import edu.spec.teacher.dao.iface.IUserSignInDao;
import edu.spec.teacher.model.SignIn;
import edu.spec.teacher.model.UserSignIn;
import edu.spec.teacher.service.iface.IUserSignInService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Author       : MadFrog
 * Date         : 2018/10/9 22:01
 * Description  :
 */
@Service
public class UserSignInService implements IUserSignInService {
    @Autowired
    private IUserSignInDao userSignInDao;

    @Override
    public UserSignIn load(Integer id) {
        return userSignInDao.load(id);
    }

    @Override
    public UserSignIn loadByUserAndSignIn(Integer userId, Integer signInId) {
        return userSignInDao.loadByUserAndSignIn(userId, signInId);
    }

    @Override
    public void update(UserSignIn userSignIn) {
        userSignInDao.update(userSignIn);
    }

    @Override
    public List<SignIn> listEffectiveSignInByUser(Integer userId) {
        return userSignInDao.listEffectiveSignInByUser(userId);
    }
}
